Latest Questions

Split an object based on other intersecting objects

I'm trying to create a wall placement system a kin to Sims, and am having trouble figuring out how to split the wall if you put another wall perpendicular to it

Pass headers in JSON.stringify

I have a try… catch statement in my code and when there is a catch I want to send a message to me for debugging. Unfortunately I am having a bit of troub

How can I test that Flutter BlocListener navigates and renders an initial Welcome page

I am trying to test that a WelcomePage widget is found when my App is first run and no authentication has yet happened. No matter what I try, I cannot verify th

Is there a way to accept image as props in react component?

I am following react tutorial teaching by Bob Zirol in freecodecamp; in my App.js I have rendered a Card.js component which I passed an image as props; so how c

How can I ask better questions on Stack Overflow beyond reading the "How do I ask a good question?" page?

I'm an enthusiast programmer. I usually ask questions on Stack Overflow when I can't solve hard programming problems myself. But when I ask questions, people us

Pass data JSON API to .sheet(isPresented) SwiftUI

How to pass data to .sheet(isPresented) I have 10 names that I get from my JSON API, but when I click on the name, the .sheet(isPresented) shows one name. In al

Convert Json string literals to utf8 characters with perl or bash

I have a file full of \u codes and want to replace them all with corresponding utf8 character, for example "\u00FC" will become "ü": Here is how far I got:

Rails 7 Ruby 3.1 LoadError: cannot load such file -- net/smtp

I upgraded to Rails 7 and Ruby 3.1. While trying to run tests with rspec I got the error below. How can I fix it? An error occurred while loading rails_helper.

how to grab the payload inside of withlatestfrom with ngrx?

hi i have the following code where the selector requires an index to grab a value from the store, I use withLatestFrom to grab this value from the store only th

JSON with roots for every selected day

I am struggling with the problem with nesting root for every day (it's an element of my table). I'd like to get nested Key: value pair of day from table Day. He

Plotting value from matching complete pairs in rows

I have data of drug concentrations (DV) that include a parent drug and its metabolite, coded DVID 1 and 2, respectively. They are provided to me as separate ro

Generic RenderFragment not allowing parameters

I create a component PopupForm which take PopupFormAvatar component as parameter [Parameter] public RenderFragment PopupFormAvatar { get; set; } [Parameter] pu

Do all ESP32 pin can be used when using wifi?

lately I build a project which is use relay and several sensor, I also use wi-fi to connect it to internet, but when I try to code digital write use some pin, i

How to filter excel file using three or more criteria and copy the filtered data to another sheet using powershell

I have a excel table as below: excel data I want to filter this file based on three criteria i.e. $criteria = "Rice","Vegetables","Butter" and copy the filtered

Django customUser models

I have faced two or three issues with django customuser model. The first one being the skills models. I wanted to add the Skills in the custom user, realized th

iOS 15 only view modifier causes crash on iOS 14 even with if #available(iOS 15.0, *)

I'm using SwiftUI's drag & drop modifiers. Since, iOS 15 gives an option to customise the onDrag modifier with a preview I'm using it as shown below. Issue:

Printing multiplication table using arrays and nested for loops

I am working on an assignment to create a multiplication table using a 2D array. This is what I came up with. 'use strict'; window.addEventListener('load',

How to create a global string in a vue (webpack) project

In my vue project I have a default image that should show up in places around the app when an image is missing or hasn't been uploaded yet. I have various class

Different behaviors between C and Rust code snippets

I have a C code snippet which uses pipe() and fork() to communicate between parent and child process. I want to replicate it in Rust. For the POSIX APIs used in

CS0120: An object reference is required for the nonstatic field, method, or property 'foo'

Consider: namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent();

How to configure maxDegreeOfParallelism for cosmosdb in Springboot?

I want to configure the CosmosQueryRequestOptions.maxDegreeOfParallelism while using the CosmosRepository. I didn't find any documentation around it. This blog

How to use Turborepo for an existing react app created with Create React App in order to make it a monorepo?

I have a fun project made with create react app. I want to convert the same application to a browser extension. This idea forces me to make the project a mono r

Pygoat docker is broken

Hi I am wondering why can't I connect to the pygoat site while it is running on docker this is the repo link https://github.com/JustinDPerkins/pygoat-tm I also

Drawing with drawString doesn't look good

The result of drawString with the same font and size in java The appearance is different when drawn with the same font and size in a painter (or word). Drawing

button doesn't add to cart - WooCommerce

I'm not sure why this is not allowing me to add to the cart. I have access to the global product but it's not capturing the ID to add to cart <?php /**

Defining Month Time Partition using Teradata Data Transfer Service Custom Schema

I am looking for a way to define a Teradata Data Transfer custom schema that implements a month based date partition. The documentation only provides a method

Bug in Microsoft x64 compiler for signed/unsigned mismatch warnings?

Consider this piece of code: #include <iostream> #include <vector> #include <cstdint> int main() { std::vector<int> a{ 10, 11, 12, 13

How to find where an object is located in a list?

i have a list "players" and i want to find if my player is players[0] or players[1] or whaterver. How do i do this?

TypeError: argument of type 'Message' is not iterable. Discord Python Bot

I get this error everytime a message is sent ive tried looking for solutions but havent found any here is the traceback: Traceback (most recent call last): Fi

Pytorch's autograd issue with joblib

There seems to be a problem mixing pytorch's autograd with joblib. I need to get gradient in parallel for a lot of samples. Joblib works fine with other aspects